package com.nine.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nine.common.pojo.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @program: nine-education-parent
 * @author: ♥丁新华
 * @create: 2023-05-22 23:44
 **/
@Mapper
public interface PermissionDao extends BaseMapper<Permission> {

    @Select (value = "select * from acl_permission p join acl_role_permission r on p.id=r\n" +
            "    .permission_id join acl_user_role ar on ar.role_id = r.role_id where\n" +
            " ar.user_id=#{userId} and type=1 ")
    List<Permission> selectByUserID(String userId);
}
